package xyz.jangle.msg;

public class MsgMain {

	public static void main(String[] args) {
		
		BufferQueue buffer = new BufferQueue();
		
		new Thread(()->{
			for(int j=0;j<10;j++) {
				for (int i = 0; i < 10; i++) {
					buffer.set(""+i);
					System.out.println("set "+i);
				}
			}
		}).start(); 
		
		new Thread(()->{
			for(int j=0;j<10;j++) {
				for (int i = 0; i < 10; i++) {
					String string = buffer.get();
					System.out.println("get "+string);
				}
			}
		}).start(); 

	}

}
